<#setting number_format="0.####">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>新增页面</title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../jlib/text/jtext.css" type="text/css" />
<link rel="stylesheet" href="../jlib/forms/jtip.css" type="text/css" />
<link rel="stylesheet" href="../js/jquery-ui-1.7.3.custom.css" type="text/css" />
<script src="../js/jquery.js" type="text/javascript"></script>
<script src="../js/jquery.ui.core.js" type="text/javascript"></script>
<script src="../js/jquery.ui.datepicker.js" type="text/javascript"></script>
<script src="../jlib/forms/jtip.js" type="text/javascript"></script>
<script src="../jlib/forms/jvalidity.js" type="text/javascript"></script>
<script src="../jlib/text/jtext.js" type="text/javascript"></script>
<script LANGUAGE="JavaScript">
var flg = "${flg!''}";
if(flg == "true"){
	alert("保存成功");
	window.parent.closediv();
}else{
	if(flg!=''){
		alert(flg);
	}
}
$(function(){
	var validations = [
			{id:"factId", rules:[
			{rule: "required", msg:"工厂Id不能为空"}
			]},{id:"password", rules:[
			{rule: "required", msg:"密码不能为空"}
			]}
			];
	$("#save").validator(validations, {}, jtip());
	$("#startworkTime").datepicker({dateFormat:"yy-mm-dd"});
});
</script>
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0" id="pop">
	<tr>
		<td width="36" height="18" valign="top" class="popTitle"><img
			src="../images/tips_1.png" width="36" height="25" /></td>
		<td width="727" class="popTitle">企业信息</td>
		<td width="35" align="left" valign="top" class="popTitle"></td>
	</tr>
	<tr>
		<td colspan="3" align="center" valign="top">
		<form action="<#if fact??>save.htm<#else>add.htm</#if>" method="post">
		<#if fact??><input type="hidden" name="factId" value="${fact.factId}">
		</#if>
		<#if qyxx??>
		<input type="hidden" name="qydm" value="${qyxx.qydm}">
		</#if>
		<table width="96%" cellpadding="0" cellspacing="0" class="table spaceTop">
		<#if fact??>
		<#else>
			<tr>
				<td width="14%" align="center" class="detailRow">工厂ID</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="factId" id="factId" class="input" value=""/></td>
				<td width="50%" colspan="2" align="center" class="detailRow"></td>
			</tr>
		</#if>
			<tr>
				<td width="14%" align="center" class="detailRow">行政区划</td>
				<td width="36%" class="row rowLeft">
				<#assign xzqhDm = (qyxx.qhdm)!''>
					<select name="qhdm" id="qhdm">
						<#list xzqhs as xzqh>
						<option value="${xzqh.qhdm}" <#if xzqh.qhdm==xzqhDm>selected="true"</#if>>${xzqh.qhmc}</option>
						</#list>
					</select>
				</td>
				<td width="25%" align="center" class="detailRow" colspan="2"></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">单位名称</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="factName" id="userName" class="input" value="${(fact.factName)!''}" <#if user??>readonly</#if>/></td>
				<td width="25%" align="center" class="detailRow">申报单位法人代码</td>
				<td width="25%" class="row rowLeft"><input type="text"
					name="directorCode" id="directorCode" class="input" value="${(fact.directorCode)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">单位地址</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="factAddress" id="factAddress" class="input" value="${(fact.factAddress)!''}"/></td>
				<td width="14%" align="center" class="detailRow">申报登记代码</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="department" id="factAddress" class="input" value="${(fact.declareCode)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">中心经度</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="xais" id="xais" class="input" value="${(fact.xais)!''}"/></td>
				<td width="14%" align="center" class="detailRow">中心纬度</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="yais" id="yais" class="input" value="${(fact.yais)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">位置</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="ringRoad" id="ringRoad" class="input" value="${(fact.ringRoad)!''}"/></td>
				<td width="14%" align="center" class="detailRow">重点类型</td>
				<#assign focusCode = (fact.focusType)!''>
				<td width="36%" class="row rowLeft">
					<select name="focusType" id="focusType">
						<#list focus as focu>
						<option value="${focu.code}" <#if focu.code==focusCode>selected</#if>>${focu.name}</option>
						</#list>
					</select>
				</td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">专职环保人员数</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="workNumber" id="workNumber" class="input" value="${(fact.workNumber)!''}"/></td>
				<td width="14%" align="center" class="detailRow">营业面积</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="bussinessArea" id="bussinessArea" class="input" value="${(fact.bussinessArea)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">单位类别</td>
				<#assign kindCode = (fact.factKind)!''>
				<td width="36%" class="row rowLeft">
					<select name="factKind" id="factKind">
						<#list kinds as kind>
						<option value="${kind.code}" <#if kind.code==kindCode>selected</#if>>${kind.name}</option>
						</#list>
					</select>
				<td width="14%" align="center" class="detailRow">注册类型</td>
				<td width="36%" class="row rowLeft">
				<#assign havingCode = (fact.factHavingtype)!''>
				<select name="factHavingtype" id="factHavingtype">
						<#list havings as hav>
						<option value="${hav.code}" <#if hav.code==havingCode>selected</#if>>${hav.name}</option>
						</#list>
					</select>
				</td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">行业类别</td>
				<td width="36%" class="row rowLeft">
				<#assign tradeCode=(fact.tradeCode)!''>
					<select name="tradeCode" id="tradeCode">
						<#list trades as trade>
						<option value="${trade.code}" <#if trade.code==tradeCode>selected</#if>>${trade.name}</option>
						</#list>
					</select>
				</td>
				<td width="14%" align="center" class="detailRow">30w瓦</td>
				<td width="36%" class="row rowLeft"><!--<input type="text"
					name="department" id="department" class="input" value="${(fact.department)!''}" />--></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">企业规模</td>
				<td width="36%" class="row rowLeft">
				<#assign scaleCode=(fact.factScale)!''>
					<select name="factScale" id="factScale">
						<#list scales as scale>
						<option value="${scale.code}" <#if scale.code==scaleCode>selected</#if>>${scale.name}</option>
						</#list>
					</select>
				<td width="14%" align="center" class="detailRow">隶属关系</td>
				<td width="36%" class="row rowLeft"><!--<input type="text"
					name="department" id="department" class="input" value="${(fact.department)!''}" />--></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">地区代码</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="areaCode" id="areaCode" class="input" value="${(fact.areaCode)!''}"/></td>
				<td width="14%" align="center" class="detailRow">投产日期</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="startworkTime" id="startworkTime" readonly class="input" value="<#if (fact.startworkTime)??>${fact.startworkTime?string('yyyy-MM-dd')}</#if>" /></td>
			</tr>
			
			<tr>
				<td width="14%" align="center" class="detailRow">所属开发区</td>
				<td width="36%" class="row rowLeft">
					<input name="developArea" id="developArea" value="${(fact.developArea)!''}">
				</td>
				<td width="14%" align="center" colspan="2" class="detailRow"></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">开户行</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="bankName" id="bankName" class="input" value="${(fact.bankName)!''}"/></td>
				<td width="14%" align="center" class="detailRow">银行帐号</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="bankNum" id="bankNum" class="input" value="${(fact.bankNum)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">环保机构</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="fullName" id="fullName" class="input" value="${(fact.fullName)!''}"/></td>
				<td width="14%" align="center" class="detailRow">法人代表</td>
				<td width="36%" class="row rowLeft"><!--<input type="text"
					name="department" id="department" class="input" value="${(fact.department)!''}" />--></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">联系人</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="envPeople" id="envPeople" class="input" value="${(fact.envPeople)!''}"/></td>
				<td width="14%" align="center" class="detailRow">联系电话</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="factTel" id="factTel" class="input" value="${(fact.factTel)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">传真</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="fax" id="fax" class="input" value="${(fact.fax)!''}"/></td>
				<td width="14%" align="center" class="detailRow">上级主管部门</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="masterDep" id="masterDep" class="input" value="${(fact.masterDep)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">电子邮件</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="eMail" id="eMail" class="input" value="${(fact.eMail)!''}"/></td>
				<td width="14%" align="center" class="detailRow">邮编</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="postCode" id="postCode" class="input" value="${(fact.postCode)!''}" /></td>
			</tr>
			<tr>
				<td width="14%" align="center" class="detailRow">通信地址</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="postAddress" id="postAddress" class="input" value="${(fact.postAddress)!''}"/></td>
				<td width="14%" align="center" class="detailRow">备注</td>
				<td width="36%" class="row rowLeft"><input type="text"
					name="note" id="note" class="input" value="${(fact.note)!''}" /></td>
			</tr>
		</table>
		<div class="btnDiv"><input name="button" type="button" id="save" class="btn" value="提交"/>
		
		</div>
		</td>
		</form>
	</tr>
</table>
</body>
</html>
